<%-- 
    Document   : nonachievers
    Created on : May 1, 2010, 8:40:58 PM
    Author     : Caesar
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<f:view locale="#{locale.locale}">
    <f:loadBundle basename="ru.ssau.berlin.jsf.i18n.Messages" var="bundle"/>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title><h:outputText value="#{bundle.ssau_manage_system} :: #{bundle.non_achievers}"/></title>
        </head>
        <body>
            <small>
                <h:form>
                    <h:commandLink action="#{locale.setLocale}" value="en">
                        <f:param name="locale" value="en"/>
                    </h:commandLink> |
                    <h:commandLink action="#{locale.setLocale}" value="ru">
                        <f:param name="locale" value="ru"/>
                    </h:commandLink>
                </h:form>
            </small>
            <h1><h:outputText value="#{bundle.non_achievers}"/></h1>
            <h:form>
                <h:dataTable value="#{query.faculties}" var="item"
                             rendered="#{not empty query.faculties}">
                    <h:column>
                        <h2><h:outputText value="#{item.name}"/></h2>
                        <h:dataTable value="#{query.nonAchievers[item]}" var="subitem"
                                     rendered="#{not empty query.nonAchievers[item]}"
                                     border="1">
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="#{bundle.id}"/>
                                </f:facet>
                                <h:commandLink action="#{person.showPerson}"
                                               value="#{subitem.id}">
                                    <f:param name="id_param" value="#{subitem.id}"/>
                                </h:commandLink>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="#{bundle.name}"/>
                                </f:facet>
                                <h:outputText value="#{subitem.name}"/>
                            </h:column>
                        </h:dataTable>
                        <h:outputText value="#{bundle.no_non_achievers}"
                                      rendered="#{empty query.nonAchievers[item]}"/>
                    </h:column>
                </h:dataTable>
            </h:form>
            <h:form>
                <h2><h:outputText value="#{bundle.navigation}"/></h2>
                <h:commandLink action="#{navigator.goToMainPage}" value="#{bundle.home}"/>
            </h:form>
        </body>
    </html>
</f:view>
